package edu.sctu.chengongsuo.day20150430;

/**
 * Created by user0 on 2015/4/30.
 */
public class DayClient {


    public static void main(String[] args) {
//        runCalculator();

        runCheckParamNotNull();

    }

    private static void runCheckParamNotNull() {

        shouldAssertFailedWhenParamIsNull(null);
    }

    private static void shouldAssertFailedWhenParamIsNull(Calculator param) {

        assert param == null : "param should not null";
        System.out.println("hello");
    }

    private static void runCalculator() {
        // 实现计算器的加减乘除


        Calculator calulator = new Calculator();

        int result;

        result = calulator.plus(2,3);
        System.out.println("2 + 3 = " + result);

        result = calulator.sub(2, 3);
        System.out.println("2 - 3 = " + result);

        result = calulator.multi(2, 3);
        System.out.println("2 * 3 = " + result);

        result = Calculator.divide(2, 3);
        System.out.println("2 / 3 = " + result);
    }

}
